package com.compass.doctor.dialog

import android.view.Gravity
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.fragment.app.FragmentActivity
import com.compass.doctor.databinding.DialogGoodAtBinding
import com.compass.doctor.databinding.DialogRefusalBinding
import com.compass.framework.base.BaseDialog
import com.compass.framework.base.BaseDialogFragment
import com.compass.framework.ext.onClick
import com.compass.framework.manager.UserInfoManager

/**
 * Description： 医生擅长Dialog
 * Date:2023/12/13 17:32
 */
class DoctorGoodAtDialog {
    class Builder(activity: FragmentActivity) : BaseDialogFragment.Builder<Builder>(activity) {


        private val mBinding: DialogGoodAtBinding =
            DialogGoodAtBinding.inflate(LayoutInflater.from(activity))

        init {

            initView()
        }

        private fun initView() {
            setContentView(mBinding.root)
            setWidth(ViewGroup.LayoutParams.MATCH_PARENT)
            setHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
            setAnimStyle(BaseDialog.AnimStyle.BOTTOM)
            gravity = Gravity.BOTTOM
            val user = UserInfoManager.getUserInfo()

            mBinding.tvIntroduce.text=user?.getIntroduceString()
            mBinding.tvMeritIllness.text=user?.meritIllness?:"暂未填写"
            mBinding.tvMeritTherapeutic.text=user?.meritTherapeutic?:"暂未填写"


            mBinding.tvCancel.onClick {
                dismiss()
            }
        }


    }
}